home *** CD-ROM | disk | FTP | other *** search
- /* s t d i o
- *
- * This provides a stream IO buffering scheme which is provides
- * higher level IO functions over the lower level functions.
- * A file associated with buffering is called a stream and is
- * declared to be a pointer to the type FILE.
- *
- * Normally there are three open streams with pointers declared
- * in <stdio.h>:
- *
- * stdin standard input file
- * stdout standard output file
- * stderr standard error file
- *
- * The constant NULL designates the non-existent pointer. The constant
- * EOF is returned on eof and by many functions to designate an
- * error condition.
- *
- * Any module which uses this package must include the header file
- * at the beginning of the module:
- *
- * #include <stdio.h>
- *
- * The following functions are implemented as macros:
- *
- * getc
- * getchar
- * putc
- * putchar
- * feof
- * ferror
- * fileno
- * clearerr
- *
- * This file contains basic data structure declarations for the stdio
- * package. Runtime cleanup is done by _ioflush.
- *
- * Patchlevel 1.1
- *
- * Edit History:
- * 05-Sep-1989 Add _wrapstdio for cleaner system interface via
- * atexit().
- */
-
- #if defined(MSDOS)
- #include <fcntl.h>
- #endif
-
- #include "stdiolib.h"
-
- static struct _iobuf _stdin = {NULL, NULL, NULL, 0, _IOREAD, 0, 0};
- static struct _iobuf _stdout = {NULL, NULL, NULL, 0, _IOWRITE, 1, 0};
- static struct _iobuf _stderr = {NULL, NULL, NULL, 0, _IOWRITE, 2, 0};
-
- struct _iobuf *_iop[_NFILE] = {&_stdin, &_stdout, &_stderr};
-
- #if defined(MSDOS)
- int _wrapstdio = 1;
- extern int _fmode = O_BINARY;
- #endif
-